 import {onMounted,onUnmounted,reactive} from 'vue'
 export default ()=>{
  let p=reactive({
    x:'暂无数据',
    y:'暂无数据'
  })
  let getPoint=(e)=>{
    console.log(e,'====');
    let {clientX,clientY}=e;
    p.x=clientX;
    p.y=clientY;
  }
  onMounted(() => {
    document.addEventListener('mousemove',getPoint)
  })
  onUnmounted(()=>{
    document.removeEventListener('mousemove',getPoint)
  })
  return p
}